package cn.abcsys.cloud.devops.runtime.dao;

import java.sql.SQLException;
import java.util.List;

import cn.abcsys.cloud.devops.runtime.entity.ClusterEnv;
/**
 * @author mayunhao
 * @date   June 15,2017
 */
public interface ClusterEnvMapper {
	/**
	 * 创建环境集群关联
	 * @param env
	 * @return
	 */
	public int insertEnv(ClusterEnv clusterEnv) throws SQLException;
	/**
	 * 根据环境删除
	 * @param envId
	 * @return
	 */
	public int deleteByEnv(Integer envId) throws SQLException;
	/**
	 * 根据集群删除
	 * @param envId
	 * @return
	 */
	public int deleteByCluster(Integer clusterId) throws SQLException;
	/**
	* @Title: getEnvByCluster 
	* @Description: 批量查询 
	* @param @param clusterId
	* @param @return
	* @param @throws SQLException    设定文件 
	* @return List<Cluster>    返回类型 
	* @throws
	 */
	public List<ClusterEnv> getEnvByCluster(Integer clusterId) throws SQLException;
	/**
	* @Title: getClusterByEnv 
	* @Description: 批量查询 
	* @param @param envId
	* @param @return
	* @param @throws SQLException    设定文件 
	* @return List<Cluster>    返回类型 
	* @throws
	 */
	public List<ClusterEnv> getClusterByEnv(Integer envId) throws SQLException;
}
